let obj = {};
Object.defineProperties(
    obj,{
        key1:{value:'value1',enumerable:true},
        key2:{value:'value2',enumerable:true}
    }
);
//console.log(obj)

let obj1 = {
    a:1
}
obj1.__proto__.b=2;
//在for in循环的时候是可以获取原型上继承过来的属性
for(let key in obj1){
    if(obj1.hasOwnProperty(key)){
        console.log(key)
    }
}